- if @blog.nil?
  .well
    -if !current_user.nil?
      Create your first blog
    - else
      %em current_user
      is not defined. You have to be logged in with Devise in order to configure your first blog.
- else
  - if @posts.empty? and @drafts.empty?
    .well
      = link_to "Create Your First Post", new_post_path, :class => "btn"
  - else
    - unless @drafts.empty?
      %h3.head Your #{pluralize(@drafts.count, "draft")}:
      - @drafts.each do |draft|
        - @post = draft
        - unless @post.nil?
          = render "post"
      - unless @posts.empty?
        %hr.gradient-white
    - old_date = DateTime.now + 1.day
    - @posts.each do |post|
      - @post = post
      - unless @post.nil?
        - unless old_date.day == @post.written_at.day and old_date.month == @post.written_at.month and old_date.year == @post.written_at.year
          %h3.head
            = @post.written_at.strftime("%B %d, %Y")
        = render "post"
        - old_date = @post.written_at
    = will_paginate(@posts, :renderer => BootstrapPagination::Rails)
